import Vue from 'vue'
import VueRouter from 'vue-router'
const User  = ()=> import("../views/user/user.vue")
const Home = ()=>import("../views/home/home.vue")
const Cart  = ()=> import("../views/cart/cart.vue")
const Category = ()=>import("../views/category/category.vue")
Vue.use(VueRouter)

const routes = [
  {
    path:"",
    redirect:"/home"
  },
  {
    path:"/home",
    component:Home
  },
  {
    path:"/category",
    component:Category
  },
  {
    path:"/cart",
    component:Cart
  },
  {
    path:"/user",
    component:User
  },
]

const router = new VueRouter({
  mode: 'history',
  base: process.env.BASE_URL,
  routes
})

export default router
